
//
//  PageContentController.m
//  42centerTwo
//
//  Created by dragon on 15/10/20.
//  Copyright © 2015年 dragon. All rights reserved.
//

#import "PageContentController.h"

@interface PageContentController ()
@end

@implementation PageContentController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    _fristViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"tabBarController"];
    self.backgroudImage.image = [UIImage imageNamed:self.imageFile];
    self.titleLable.text = self.titleText;
    
    UIButton * button = [[UIButton alloc] initWithFrame:CGRectMake(self.view.frame.size.width/3,  3 * self.view.frame.size.height / 4, self.view.frame.size.width/3, 3 * self.view.frame.size.height / 32)];
    button.backgroundColor = [UIColor redColor];
    button.tintColor = [UIColor whiteColor];
    [button setTitle:@"进入" forState:UIControlStateNormal];
    [button addTarget:self action:@selector(ButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

-(void) ButtonAction:(UIButton*)button {
    _fristViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    [self presentViewController:_fristViewController animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
